package com.hbqyml.system.service.impl;

import com.hbqyml.system.domain.HbClassify;
import com.hbqyml.system.domain.vo.HbClassifyVo;
import com.hbqyml.system.mapper.HbClassifyMapper;
import com.hbqyml.system.service.IHbClassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 类型Service业务层处理
 * 
 * @author houyutong
 * @date 2022-03-25
 */
@Service
public class HbClassifyServiceImpl implements IHbClassifyService 
{
    @Autowired
    private HbClassifyMapper hbClassifyMapper;

    /**
     * 查询类型
     * 
     * @param classifyId 类型主键
     * @return 类型
     */
    @Override
    public HbClassify selectHbClassifyByClassifyId(Integer classifyId)
    {
        return hbClassifyMapper.selectHbClassifyByClassifyId(classifyId);
    }

    /**
     * 查询类型列表
     * 
     * @param hbClassify 类型
     * @return 类型
     */
    @Override
    public List<HbClassify> selectHbClassifyList(HbClassify hbClassify)
    {
        return hbClassifyMapper.selectHbClassifyList(hbClassify);
    }

    /**
     * 新增类型
     * 
     * @param hbClassify 类型
     * @return 结果
     */
    @Override
    public int insertHbClassify(HbClassify hbClassify)
    {
        return hbClassifyMapper.insertHbClassify(hbClassify);
    }

    /**
     * 修改类型
     * 
     * @param hbClassify 类型
     * @return 结果
     */
    @Override
    public int updateHbClassify(HbClassify hbClassify)
    {
        return hbClassifyMapper.updateHbClassify(hbClassify);
    }

    /**
     * 批量删除类型
     * 
     * @param classifyIds 需要删除的类型主键
     * @return 结果
     */
    @Override
    public int deleteHbClassifyByClassifyIds(Integer[] classifyIds)
    {
        return hbClassifyMapper.deleteHbClassifyByClassifyIds(classifyIds);
    }

    /**
     * 删除类型信息
     * 
     * @param classifyId 类型主键
     * @return 结果
     */
    @Override
    public int deleteHbClassifyByClassifyId(Integer classifyId)
    {
        return hbClassifyMapper.deleteHbClassifyByClassifyId(classifyId);
    }


    /**
     * 获取所有类型
     * @return
     */
    @Override
    public List<HbClassifyVo> getAllClassify(String search) {
        return hbClassifyMapper.getAllClassify(search);
    }


}
